import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'

//在路口文件引入一次store就可以
import store from './store/index'
import App from './App'

const next = store.dispatch
store.dispatch = (action) => {
  console.log('动作前：', store.getState())
  next(action)
  console.log('动作前：', store.getState())
}

ReactDOM.render(
    <Provider store={store}>
        <App/>
    </Provider>, 
    document.getElementById('root'))